{include file='/public/header'}

<div class="am-cf admin-main">
    {include file='/public/sidebar'}

    <!-- content start -->
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">分类管理</strong> / <small>分类列表</small></div>
            </div>
            <hr>

            <div class="am-g">
                <div class="am-u-sm-12 am-u-md-6">
                    <div class="am-btn-toolbar">
                        <div class="am-btn-group am-btn-group-xs">
                            <a class="am-btn am-btn-default" href="{:url('/admin/category/add')}"><span class="am-icon-plus"></span> 新增分类</a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="am-g">
                <div class="am-u-sm-12">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-check"><input type="checkbox" /></th>
                            <th class="table-id">ID</th>
                            <th class="table-title">标题</th>
                            <th class="table-set">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="list" id="vo" key="k"}
                        <tr>
                            <td><input type="checkbox" /></td>
                            <td>{$k}</td>
                            <td {if $vo['pid']}style="text-indent: 40px;"{/if}><a href="#">{$vo.name}</a></td>
                            <td>
                                <div class="am-btn-toolbar">
                                    <div class="am-btn-group am-btn-group-xs">
                                        <button type="button" class="am-btn am-btn-default am-btn-xs am-text-secondary" onclick="location.href='{:url('admin/category/edit',['id'=>$vo['id']])}'"><span class="am-icon-pencil-square-o"></span> 编辑</button>
                                        <button type="button" class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only" ajax-del="{:url('admin/category/del',['id'=>$vo['id']])}"><span class="am-icon-trash-o"></span> 删除</button>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!-- content end -->
</div>

{include file='/public/footer'}
